// 将加密数据还原
var arg = process.argv[2]; // 输入：node buffer-decode.js dXNlck5hbWU6amluc2hpeXVuIHB3ZDogMTIzNA==

var buf1 = Buffer.from(arg, "base64");
var str = buf1.toString("utf-8");
// console.log(str); // userName:jinshiyun pwd:1234

var arr = str.split(" ");
// console.log(arr); // ['userName:jinshiyun','pwd:1234']

var userInfor = {"userName": arr[1],
                "pwd": arr[3]};
console.log(userInfor); //{ userName: 'pwd:', pwd: undefined }